package com.example.teliaCellInfo;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class CustomList extends ArrayAdapter<String> {
	// private final Context context;
	private final Activity activity;
	private final String[] title;
	private final String[] values;

	public CustomList(Activity activity, String[] title, String[] values) {
		super(activity, R.layout.list_text_view, title);
		this.activity = activity;
		this.title = title;
		this.values = values;
	}

	@Override
	public View getView(int position, View view, ViewGroup parent) {

		LayoutInflater inflater;
		inflater = (LayoutInflater) getContext().getSystemService(
				Context.LAYOUT_INFLATER_SERVICE);
		View rowView = inflater.inflate(R.layout.list_text_view, null);
		TextView txtTitle = (TextView) rowView.findViewById(R.id.txt);
		TextView txtValues = (TextView) rowView.findViewById(R.id.txtValues);
		txtTitle.setText(title[position]);
		txtValues.setText(values[position]);
		return rowView;

	}

}
